import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		PathAlg algo = new ExhaustiveAlgorithm();
		if(args.length != 1)
		{
			System.err.println("Usage `java main FILE`");
			return;
		}
		algo.buildGraph(args[0]);
		long t = Calendar.getInstance().getTimeInMillis();
		algo.runAlgorithm();
		t = Calendar.getInstance().getTimeInMillis() - t;

		System.out.print("Min. Expected Latencey: "
			+ algo.getExpectedLatency() + "\nPath: ");
		
		for(int i : algo.getPath())
		{
			System.out.print((i+1) + " ");
		}

		System.out.println("\nExecution time in ms: " + t);
		System.out.println();
	}
}

